const OpenAI = require('openai').default

// # for backward compatibility, you can still use `https://api.deepseek.com/v1` as `baseURL`.
const openai = new OpenAI({
  baseURL: 'https://api.deepseek.com',
  apiKey: 'sk-d4da341c9acb4023b2e489056cabb89c'
})

async function main() {
  const completion = await openai.chat.completions.create({
    messages: [{ role: 'system', content: '你能中文输出吗' }],
    model: 'deepseek-chat'
  })

  console.log(completion.choices[0].message.content)
}

main()
